package nodes;

import nodes.visitor.NodeVisitor;

public class ConstNode<T> implements Node<T> {
	
private T v;
	
	public ConstNode(T v) {
		this.v = v;
	}
	
	public void accept(NodeVisitor visit) {
		visit.visitConstNode(this);
	}
	
	public T evaluate(T[] param) {
		return v;
	}
	
//	public void display(int indent) {
//		String in = new String();
//		for(int i = 0; i < indent; i++)
//			in = in + " ";
//		
//		System.out.println(in + v);
//	}
	
	public Node<T> copyNode() {
		return new ConstNode<T>(v);
	}
	
	public T getValue() {
		return v;
	}
}
